﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using NLBS.Entity;
using NLBS.Data;
namespace NLBS.Web.Modules
{
   public class CounterModule : IHttpModule
    {
        #region IHttpModule Members

        public void Dispose()
        {
            //throw new NotImplementedException();
        }

        public void Init(HttpApplication context)
        {

            context.BeginRequest += new EventHandler(context_BeginRequest);
        }

        void context_BeginRequest(object sender, EventArgs e)
        {
            //if(HttpContext.Current.Request.RawUrl.Contains(".aspx"))
            //{
            //VisitorRecord vr = new VisitorRecord();
            //vr.Browser = HttpContext.Current.Request.Browser.Browser;
            //vr.IP = RequestWrapper.IP;
            //vr.Target = HttpContext.Current.Request.RawUrl;
            //vr.Time = DateTime.Now;
            //vr.OS = "os";
            //vr.Referer = string.Empty;
            //DbProvider.Instance().InsertVisitorRecord(vr);
            //}
        }

       

        #endregion
    }
}
